package mypackage;

import java.util.Scanner;

public class subStringTest {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个手机号");
        String prv,back,ans;

        while(true){
            String number=sc.next();
            if(number.charAt(0)!='1' || number.length()!=11){
                System.out.println("输入的手机号错误,请重新输入");
            }else{
                prv=number.substring(0,3);
                back=number.substring(7);
                ans=prv+"****"+back;
                break;
            }
        }
        System.out.println(ans);
    }
}
